package com.lbb.cas.atomic;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class AtomicConcurrentBuy {
	
	
	private ExecutorService threadPool = Executors.newFixedThreadPool(50);
	
	
	public static void main(String[] args) {
		
		new AtomicConcurrentBuy().run();
	}
	
	
	public void run (){
		
		int i = 0 ;
		while (i<100){
			
			i++;
			threadPool.execute(new AtomicBuyRunnable());
		}
		
		threadPool.shutdown();
		
		
	}
	
	

}
